get analytics user created
Track daily user creation metrics on TabNews with this tool, enabling data-driven insights into platform growth through the MCP TabNews Integration server.
Instructions
To get how many users were created (per day) in tabnews
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/status.ts:193-214 (handler)The MCP tool handler function for 'get analytics user created'. Fetches analytics data using the service function and formats it as a text response.handler: async (): Promise<McpResponse> => { try { const result = await getAnalyticsUserCreated(); const content: McpTextContent = { type: "text", text: `Analytics User Created:\n\n${JSON.stringify(result, null, 2)}`, }; return { content: [content], }; } catch (error) { if (error instanceof Error) { throw new Error( `Failed to get analytics user created: ${error.message}` ); } else { throw new Error("Failed to get analytics user created"); } } },
- src/index.ts:59-64 (registration)Registration of the 'get analytics user created' tool in the MCP server instance.server.tool( getAnalyticsUserCreatedTool.name, getAnalyticsUserCreatedTool.description, getAnalyticsUserCreatedTool.parameters, getAnalyticsUserCreatedTool.handler );
- src/services/api.ts:83-90 (helper)Service helper function that fetches user creation analytics data from the TabNews API.export async function getAnalyticsUserCreated(): Promise< AnalyticsUserCreated[] > { const response = await fetch(`${TABNEWS_API_URL}/analytics/users-created`); const data = await response.json(); return data as AnalyticsUserCreated[]; }
- src/types/index.ts:120-123 (schema)Type schema for the AnalyticsUserCreated data structure returned by the tool.export interface AnalyticsUserCreated { date: string; cadastros: number; }